package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.TwrOilPowerFeeMapper;
import com.rzl.expense.expense.domain.TwrOilPowerFee;
import com.rzl.expense.expense.service.ITwrOilPowerFeeService;

/**
 * 油机发电费账单Service业务层处理
 * 
 * @author expense
 * @date 2024-11-30
 */
@Service
public class TwrOilPowerFeeServiceImpl implements ITwrOilPowerFeeService 
{
    @Autowired
    private TwrOilPowerFeeMapper twrOilPowerFeeMapper;

    /**
     * 查询油机发电费账单
     * 
     * @param oilPowerFeeId 油机发电费账单主键
     * @return 油机发电费账单
     */
    @Override
    public TwrOilPowerFee selectTwrOilPowerFeeByOilPowerFeeId(String oilPowerFeeId)
    {
        return twrOilPowerFeeMapper.selectTwrOilPowerFeeByOilPowerFeeId(oilPowerFeeId);
    }

    /**
     * 查询油机发电费账单列表
     * 
     * @param twrOilPowerFee 油机发电费账单
     * @return 油机发电费账单
     */
    @Override
    public List<TwrOilPowerFee> selectTwrOilPowerFeeList(TwrOilPowerFee twrOilPowerFee)
    {
        return twrOilPowerFeeMapper.selectTwrOilPowerFeeList(twrOilPowerFee);
    }

    /**
     * 新增油机发电费账单
     * 
     * @param twrOilPowerFee 油机发电费账单
     * @return 结果
     */
    @Override
    public int insertTwrOilPowerFee(TwrOilPowerFee twrOilPowerFee)
    {
        twrOilPowerFee.setCreateTime(DateUtils.getNowDate());
        return twrOilPowerFeeMapper.insertTwrOilPowerFee(twrOilPowerFee);
    }

    /**
     * 修改油机发电费账单
     * 
     * @param twrOilPowerFee 油机发电费账单
     * @return 结果
     */
    @Override
    public int updateTwrOilPowerFee(TwrOilPowerFee twrOilPowerFee)
    {
        return twrOilPowerFeeMapper.updateTwrOilPowerFee(twrOilPowerFee);
    }

    /**
     * 批量删除油机发电费账单
     * 
     * @param oilPowerFeeIds 需要删除的油机发电费账单主键
     * @return 结果
     */
    @Override
    public int deleteTwrOilPowerFeeByOilPowerFeeIds(String[] oilPowerFeeIds)
    {
        return twrOilPowerFeeMapper.deleteTwrOilPowerFeeByOilPowerFeeIds(oilPowerFeeIds);
    }

    /**
     * 删除油机发电费账单信息
     * 
     * @param oilPowerFeeId 油机发电费账单主键
     * @return 结果
     */
    @Override
    public int deleteTwrOilPowerFee(String yearmonth)
    {
        return twrOilPowerFeeMapper.deleteTwrOilPowerFee(yearmonth);
    }




    @Override
    public void batchTwrOilPowerFee(List<TwrOilPowerFee> list)
    {

         twrOilPowerFeeMapper.batchTwrOilPowerFee(list);
    }


}
